package com.bdqn.ch07.repository;

import com.bdqn.ch07.entity.Right;
import com.bdqn.ch07.entity.Role;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface RightRepository extends JpaRepository<Right, Long>, JpaSpecificationExecutor<Right> {

    public List<Right> findRightsByRolesOrderByRightCode(Role role); //根据角色查询权限
}

